package com.handpay.nocardpay.baselibrary.qualificationinfo.model.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by fplei on 2017/8/15.
 */

public class SelectedBank implements Parcelable{
    private int index=-1;
    private Bank bank;

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public Bank getBank() {
        return bank;
    }

    public void setBank(Bank bank) {
        this.bank = bank;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.index);
        dest.writeSerializable(this.bank);
    }

    public SelectedBank() {
    }

    protected SelectedBank(Parcel in) {
        this.index = in.readInt();
        this.bank = (Bank) in.readSerializable();
    }

    public static final Creator<SelectedBank> CREATOR = new Creator<SelectedBank>() {
        @Override
        public SelectedBank createFromParcel(Parcel source) {
            return new SelectedBank(source);
        }

        @Override
        public SelectedBank[] newArray(int size) {
            return new SelectedBank[size];
        }
    };
}
